import matplotlib.pyplot as plt
import numpy as np

plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.rcParams['axes.unicode_minus']=False #用来正常显示负号

def loadCSVfile2():
    tmp=np.loadtxt("score.csv",dtype=np.str,delimiter=",")
    data=tmp[1:].astype(np.str)
    return data

datagnd=loadCSVfile2()
#print(datagnd)
d=len(datagnd)#列数
d2=len(datagnd[0])#行数
#print(d)
#print(d2)
aList=[0]*d
x=[]
for i in range(d):
    for j in range(1,d2):
        aList[i]+=int(datagnd[i][j])

#print(aList)
for i in range(d):
    x.append(datagnd[i][0])

plt.bar(x,aList)
plt.show()
print(x)
print(aList)

